package com.ruoyi.supermarket.mapper;

import java.util.List;
import com.ruoyi.supermarket.domain.SupermarketSale;
import org.apache.ibatis.annotations.Select;

/**
 * 销售信息Mapper接口
 * 
 * @author faye
 * @date 2024-05-27
 */
public interface SupermarketSaleMapper 
{
   @Select("select * from supermarket_sale left join supermarket_commodity on supermarket_commodity.commodity_id =supermarket_sale.sale_commodity_id")
    public  List<SupermarketSale> findAll();


    /**
     * 查询销售信息
     * 
     * @param saleId 销售信息主键
     * @return 销售信息
     */
    public SupermarketSale selectSupermarketSaleBySaleId(Long saleId);

    @Select("select * from supermarket_sale s where s.sale_number=#{saleNum}")
    public SupermarketSale selectSupermarketSaleBySaleNum(Long saleNum);

    /**
     * 查询销售信息列表
     * 
     * @param supermarketSale 销售信息
     * @return 销售信息集合
     */
    public List<SupermarketSale> selectSupermarketSaleList(SupermarketSale supermarketSale);

    /**
     * 新增销售信息
     * 
     * @param supermarketSale 销售信息
     * @return 结果
     */
    public int insertSupermarketSale(SupermarketSale supermarketSale);

    /**
     * 修改销售信息
     * 
     * @param supermarketSale 销售信息
     * @return 结果
     */
    public int updateSupermarketSale(SupermarketSale supermarketSale);

    /**
     * 删除销售信息
     * 
     * @param saleId 销售信息主键
     * @return 结果
     */
    public int deleteSupermarketSaleBySaleId(Long saleId);

    /**
     * 批量删除销售信息
     * 
     * @param saleIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSupermarketSaleBySaleIds(Long[] saleIds);
}
